package com.example.superoa.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the transfer database table.
 * 
 */
@Entity
@NamedQuery(name="Transfer.findAll", query="SELECT t FROM Transfer t")
public class Transfer implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int transfer_id;

	@Column(name="transfer_state")
	private String transferState;

	//bi-directional many-to-one association to Staff
	@ManyToOne
	@JoinColumn(name="staff_id")
	private Staff staff;

	//bi-directional many-to-one association to TransferApproval
	@OneToMany(mappedBy="transfer")
	private List<TransferApproval> transferApprovals;

	//bi-directional many-to-one association to TransferJl
	@OneToMany(mappedBy="transfer")
	private List<TransferJl> transferJls;

	//bi-directional many-to-one association to TransferType
	@OneToMany(mappedBy="transfer")
	private List<TransferType> transferTypes;

	public Transfer() {
	}

	public int getTransfer_id() {
		return this.transfer_id;
	}

	public void setTransfer_id(int transfer_id) {
		this.transfer_id = transfer_id;
	}

	public String getTransferState() {
		return this.transferState;
	}

	public void setTransferState(String transferState) {
		this.transferState = transferState;
	}

	public Staff getStaff() {
		return this.staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

	public List<TransferApproval> getTransferApprovals() {
		return this.transferApprovals;
	}

	public void setTransferApprovals(List<TransferApproval> transferApprovals) {
		this.transferApprovals = transferApprovals;
	}

	public TransferApproval addTransferApproval(TransferApproval transferApproval) {
		getTransferApprovals().add(transferApproval);
		transferApproval.setTransfer(this);

		return transferApproval;
	}

	public TransferApproval removeTransferApproval(TransferApproval transferApproval) {
		getTransferApprovals().remove(transferApproval);
		transferApproval.setTransfer(null);

		return transferApproval;
	}

	public List<TransferJl> getTransferJls() {
		return this.transferJls;
	}

	public void setTransferJls(List<TransferJl> transferJls) {
		this.transferJls = transferJls;
	}

	public TransferJl addTransferJl(TransferJl transferJl) {
		getTransferJls().add(transferJl);
		transferJl.setTransfer(this);

		return transferJl;
	}

	public TransferJl removeTransferJl(TransferJl transferJl) {
		getTransferJls().remove(transferJl);
		transferJl.setTransfer(null);

		return transferJl;
	}

	public List<TransferType> getTransferTypes() {
		return this.transferTypes;
	}

	public void setTransferTypes(List<TransferType> transferTypes) {
		this.transferTypes = transferTypes;
	}

	public TransferType addTransferType(TransferType transferType) {
		getTransferTypes().add(transferType);
		transferType.setTransfer(this);

		return transferType;
	}

	public TransferType removeTransferType(TransferType transferType) {
		getTransferTypes().remove(transferType);
		transferType.setTransfer(null);

		return transferType;
	}

}